﻿<html>
	<head>
		<title>RadioList - jQuery LigerUI API</title>     
		<meta http-equiv="content-type" content="text/html; charset=UTF-8" /> 
		<link href="../common.css" rel="stylesheet" type="text/css" />
		<script src="../core.js" type="text/javascript"></script> 
	</head>
	<body>
		<h2>ligerRadioList</h2> 
         
        
                    <p> 
            单选框列表
        </p>
                     
          
                <h3>示例</h3>
        <pre><div><!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

--><span style="color: #008080;"> 1</span> <span style="color: #000000;">  </span><span style="color: #0000FF;">&lt;</span><span style="color: #800000;">script </span><span style="color: #FF0000;">type</span><span style="color: #0000FF;">=&quot;text/javascript&quot;</span><span style="color: #0000FF;">&gt;</span><span style="background-color: #F5F5F5; color: #000000;">
</span><span style="color: #008080;"> 2</span> <span style="background-color: #F5F5F5; color: #000000;">        $(</span><span style="background-color: #F5F5F5; color: #0000FF;">function</span><span style="background-color: #F5F5F5; color: #000000;"> ()
</span><span style="color: #008080;"> 3</span> <span style="background-color: #F5F5F5; color: #000000;">        { 
</span><span style="color: #008080;"> 4</span> <span style="background-color: #F5F5F5; color: #000000;">            </span><span style="background-color: #F5F5F5; color: #0000FF;">var</span><span style="background-color: #F5F5F5; color: #000000;"> dataGrid </span><span style="background-color: #F5F5F5; color: #000000;">=</span><span style="background-color: #F5F5F5; color: #000000;"> [
</span><span style="color: #008080;"> 5</span> <span style="background-color: #F5F5F5; color: #000000;">                { id: </span><span style="background-color: #F5F5F5; color: #000000;">1</span><span style="background-color: #F5F5F5; color: #000000;">, name: </span><span style="background-color: #F5F5F5; color: #000000;">'</span><span style="background-color: #F5F5F5; color: #000000;">李三</span><span style="background-color: #F5F5F5; color: #000000;">'</span><span style="background-color: #F5F5F5; color: #000000;">, sex: </span><span style="background-color: #F5F5F5; color: #000000;">'</span><span style="background-color: #F5F5F5; color: #000000;">男</span><span style="background-color: #F5F5F5; color: #000000;">'</span><span style="background-color: #F5F5F5; color: #000000;"> },
</span><span style="color: #008080;"> 6</span> <span style="background-color: #F5F5F5; color: #000000;">                { id: </span><span style="background-color: #F5F5F5; color: #000000;">2</span><span style="background-color: #F5F5F5; color: #000000;">, name: </span><span style="background-color: #F5F5F5; color: #000000;">'</span><span style="background-color: #F5F5F5; color: #000000;">李四</span><span style="background-color: #F5F5F5; color: #000000;">'</span><span style="background-color: #F5F5F5; color: #000000;">, sex: </span><span style="background-color: #F5F5F5; color: #000000;">'</span><span style="background-color: #F5F5F5; color: #000000;">女</span><span style="background-color: #F5F5F5; color: #000000;">'</span><span style="background-color: #F5F5F5; color: #000000;"> },
</span><span style="color: #008080;"> 7</span> <span style="background-color: #F5F5F5; color: #000000;">                { id: </span><span style="background-color: #F5F5F5; color: #000000;">3</span><span style="background-color: #F5F5F5; color: #000000;">, name: </span><span style="background-color: #F5F5F5; color: #000000;">'</span><span style="background-color: #F5F5F5; color: #000000;">赵武</span><span style="background-color: #F5F5F5; color: #000000;">'</span><span style="background-color: #F5F5F5; color: #000000;">, sex: </span><span style="background-color: #F5F5F5; color: #000000;">'</span><span style="background-color: #F5F5F5; color: #000000;">女</span><span style="background-color: #F5F5F5; color: #000000;">'</span><span style="background-color: #F5F5F5; color: #000000;"> },
</span><span style="color: #008080;"> 8</span> <span style="background-color: #F5F5F5; color: #000000;">                { id: </span><span style="background-color: #F5F5F5; color: #000000;">4</span><span style="background-color: #F5F5F5; color: #000000;">, name: </span><span style="background-color: #F5F5F5; color: #000000;">'</span><span style="background-color: #F5F5F5; color: #000000;">陈留</span><span style="background-color: #F5F5F5; color: #000000;">'</span><span style="background-color: #F5F5F5; color: #000000;">, sex: </span><span style="background-color: #F5F5F5; color: #000000;">'</span><span style="background-color: #F5F5F5; color: #000000;">女</span><span style="background-color: #F5F5F5; color: #000000;">'</span><span style="background-color: #F5F5F5; color: #000000;"> },
</span><span style="color: #008080;"> 9</span> <span style="background-color: #F5F5F5; color: #000000;">                { id: </span><span style="background-color: #F5F5F5; color: #000000;">5</span><span style="background-color: #F5F5F5; color: #000000;">, name: </span><span style="background-color: #F5F5F5; color: #000000;">'</span><span style="background-color: #F5F5F5; color: #000000;">陈留2</span><span style="background-color: #F5F5F5; color: #000000;">'</span><span style="background-color: #F5F5F5; color: #000000;">, sex: </span><span style="background-color: #F5F5F5; color: #000000;">'</span><span style="background-color: #F5F5F5; color: #000000;">女</span><span style="background-color: #F5F5F5; color: #000000;">'</span><span style="background-color: #F5F5F5; color: #000000;"> },
</span><span style="color: #008080;">10</span> <span style="background-color: #F5F5F5; color: #000000;">                { id: </span><span style="background-color: #F5F5F5; color: #000000;">7</span><span style="background-color: #F5F5F5; color: #000000;">, name: </span><span style="background-color: #F5F5F5; color: #000000;">'</span><span style="background-color: #F5F5F5; color: #000000;">陈留3</span><span style="background-color: #F5F5F5; color: #000000;">'</span><span style="background-color: #F5F5F5; color: #000000;">, sex: </span><span style="background-color: #F5F5F5; color: #000000;">'</span><span style="background-color: #F5F5F5; color: #000000;">女</span><span style="background-color: #F5F5F5; color: #000000;">'</span><span style="background-color: #F5F5F5; color: #000000;"> },
</span><span style="color: #008080;">11</span> <span style="background-color: #F5F5F5; color: #000000;">                { id: </span><span style="background-color: #F5F5F5; color: #000000;">6</span><span style="background-color: #F5F5F5; color: #000000;">, name: </span><span style="background-color: #F5F5F5; color: #000000;">'</span><span style="background-color: #F5F5F5; color: #000000;">陈留4</span><span style="background-color: #F5F5F5; color: #000000;">'</span><span style="background-color: #F5F5F5; color: #000000;">, sex: </span><span style="background-color: #F5F5F5; color: #000000;">'</span><span style="background-color: #F5F5F5; color: #000000;">女</span><span style="background-color: #F5F5F5; color: #000000;">'</span><span style="background-color: #F5F5F5; color: #000000;"> }
</span><span style="color: #008080;">12</span> <span style="background-color: #F5F5F5; color: #000000;">                ]; 
</span><span style="color: #008080;">13</span> <span style="background-color: #F5F5F5; color: #000000;">            $(</span><span style="background-color: #F5F5F5; color: #000000;">&quot;</span><span style="background-color: #F5F5F5; color: #000000;">#radiolist1</span><span style="background-color: #F5F5F5; color: #000000;">&quot;</span><span style="background-color: #F5F5F5; color: #000000;">).ligerRadioList({
</span><span style="color: #008080;">14</span> <span style="background-color: #F5F5F5; color: #000000;">                data: dataGrid,
</span><span style="color: #008080;">15</span> <span style="background-color: #F5F5F5; color: #000000;">                textField: </span><span style="background-color: #F5F5F5; color: #000000;">'</span><span style="background-color: #F5F5F5; color: #000000;">name</span><span style="background-color: #F5F5F5; color: #000000;">'</span><span style="background-color: #F5F5F5; color: #000000;"> 
</span><span style="color: #008080;">16</span> <span style="background-color: #F5F5F5; color: #000000;">            });
</span><span style="color: #008080;">17</span> <span style="background-color: #F5F5F5; color: #000000;">        });
</span><span style="color: #008080;">18</span> <span style="background-color: #F5F5F5; color: #000000;">
</span><span style="color: #008080;">19</span> <span style="background-color: #F5F5F5; color: #000000;">        </span><span style="background-color: #F5F5F5; color: #0000FF;">function</span><span style="background-color: #F5F5F5; color: #000000;"> getValue()
</span><span style="color: #008080;">20</span> <span style="background-color: #F5F5F5; color: #000000;">        {
</span><span style="color: #008080;">21</span> <span style="background-color: #F5F5F5; color: #000000;">            </span><span style="background-color: #F5F5F5; color: #0000FF;">var</span><span style="background-color: #F5F5F5; color: #000000;"> value </span><span style="background-color: #F5F5F5; color: #000000;">=</span><span style="background-color: #F5F5F5; color: #000000;"> liger.get(</span><span style="background-color: #F5F5F5; color: #000000;">&quot;</span><span style="background-color: #F5F5F5; color: #000000;">radiolist1</span><span style="background-color: #F5F5F5; color: #000000;">&quot;</span><span style="background-color: #F5F5F5; color: #000000;">).getValue();
</span><span style="color: #008080;">22</span> <span style="background-color: #F5F5F5; color: #000000;">            alert(value);
</span><span style="color: #008080;">23</span> <span style="background-color: #F5F5F5; color: #000000;">        }
</span><span style="color: #008080;">24</span> <span style="background-color: #F5F5F5; color: #000000;">        </span><span style="background-color: #F5F5F5; color: #0000FF;">function</span><span style="background-color: #F5F5F5; color: #000000;"> setValue()
</span><span style="color: #008080;">25</span> <span style="background-color: #F5F5F5; color: #000000;">        {
</span><span style="color: #008080;">26</span> <span style="background-color: #F5F5F5; color: #000000;">            liger.get(</span><span style="background-color: #F5F5F5; color: #000000;">&quot;</span><span style="background-color: #F5F5F5; color: #000000;">radiolist1</span><span style="background-color: #F5F5F5; color: #000000;">&quot;</span><span style="background-color: #F5F5F5; color: #000000;">).setValue(</span><span style="background-color: #F5F5F5; color: #000000;">&quot;</span><span style="background-color: #F5F5F5; color: #000000;">2</span><span style="background-color: #F5F5F5; color: #000000;">&quot;</span><span style="background-color: #F5F5F5; color: #000000;">);
</span><span style="color: #008080;">27</span> <span style="background-color: #F5F5F5; color: #000000;">        }
</span><span style="color: #008080;">28</span> <span style="background-color: #F5F5F5; color: #000000;">        </span><span style="background-color: #F5F5F5; color: #0000FF;">function</span><span style="background-color: #F5F5F5; color: #000000;"> setDisabled()
</span><span style="color: #008080;">29</span> <span style="background-color: #F5F5F5; color: #000000;">        {
</span><span style="color: #008080;">30</span> <span style="background-color: #F5F5F5; color: #000000;">            liger.get(</span><span style="background-color: #F5F5F5; color: #000000;">&quot;</span><span style="background-color: #F5F5F5; color: #000000;">radiolist1</span><span style="background-color: #F5F5F5; color: #000000;">&quot;</span><span style="background-color: #F5F5F5; color: #000000;">).set(</span><span style="background-color: #F5F5F5; color: #000000;">'</span><span style="background-color: #F5F5F5; color: #000000;">disabled</span><span style="background-color: #F5F5F5; color: #000000;">'</span><span style="background-color: #F5F5F5; color: #000000;">, </span><span style="background-color: #F5F5F5; color: #0000FF;">true</span><span style="background-color: #F5F5F5; color: #000000;">);
</span><span style="color: #008080;">31</span> <span style="background-color: #F5F5F5; color: #000000;">        }
</span><span style="color: #008080;">32</span> <span style="background-color: #F5F5F5; color: #000000;">        </span><span style="background-color: #F5F5F5; color: #0000FF;">function</span><span style="background-color: #F5F5F5; color: #000000;"> setEnabled()
</span><span style="color: #008080;">33</span> <span style="background-color: #F5F5F5; color: #000000;">        {
</span><span style="color: #008080;">34</span> <span style="background-color: #F5F5F5; color: #000000;">            liger.get(</span><span style="background-color: #F5F5F5; color: #000000;">&quot;</span><span style="background-color: #F5F5F5; color: #000000;">radiolist1</span><span style="background-color: #F5F5F5; color: #000000;">&quot;</span><span style="background-color: #F5F5F5; color: #000000;">).set(</span><span style="background-color: #F5F5F5; color: #000000;">'</span><span style="background-color: #F5F5F5; color: #000000;">disabled</span><span style="background-color: #F5F5F5; color: #000000;">'</span><span style="background-color: #F5F5F5; color: #000000;">, </span><span style="background-color: #F5F5F5; color: #0000FF;">false</span><span style="background-color: #F5F5F5; color: #000000;">);
</span><span style="color: #008080;">35</span> <span style="background-color: #F5F5F5; color: #000000;">        }
</span><span style="color: #008080;">36</span> <span style="background-color: #F5F5F5; color: #000000;">    </span><span style="color: #0000FF;">&lt;/</span><span style="color: #800000;">script</span><span style="color: #0000FF;">&gt;</span><span style="color: #000000;">
</span><span style="color: #008080;">37</span> <span style="color: #000000;"></span><span style="color: #0000FF;">&lt;/</span><span style="color: #800000;">head</span><span style="color: #0000FF;">&gt;</span><span style="color: #000000;">
</span><span style="color: #008080;">38</span> <span style="color: #000000;"></span><span style="color: #0000FF;">&lt;</span><span style="color: #800000;">body </span><span style="color: #FF0000;">style</span><span style="color: #0000FF;">=&quot;padding:10px&quot;</span><span style="color: #0000FF;">&gt;</span><span style="color: #000000;"> 
</span><span style="color: #008080;">39</span> <span style="color: #000000;">  </span><span style="color: #0000FF;">&lt;</span><span style="color: #800000;">div </span><span style="color: #FF0000;">id</span><span style="color: #0000FF;">=&quot;radiolist1&quot;</span><span style="color: #0000FF;">&gt;&lt;/</span><span style="color: #800000;">div</span><span style="color: #0000FF;">&gt;</span><span style="color: #000000;">
</span><span style="color: #008080;">40</span> <span style="color: #000000;">    </span><span style="color: #0000FF;">&lt;</span><span style="color: #800000;">br </span><span style="color: #0000FF;">/&gt;</span><span style="color: #000000;">
</span><span style="color: #008080;">41</span> <span style="color: #000000;">     </span><span style="color: #0000FF;">&lt;</span><span style="color: #800000;">div </span><span style="color: #FF0000;">class</span><span style="color: #0000FF;">=&quot;liger-button&quot;</span><span style="color: #FF0000;"> data-click</span><span style="color: #0000FF;">=&quot;getValue&quot;</span><span style="color: #FF0000;"> style</span><span style="color: #0000FF;">=&quot;margin-top:9px;&quot;</span><span style="color: #0000FF;">&gt;</span><span style="color: #000000;">获取值</span><span style="color: #0000FF;">&lt;/</span><span style="color: #800000;">div</span><span style="color: #0000FF;">&gt;</span><span style="color: #000000;">
</span><span style="color: #008080;">42</span> <span style="color: #000000;"> </span><span style="color: #0000FF;">&lt;</span><span style="color: #800000;">div </span><span style="color: #FF0000;">class</span><span style="color: #0000FF;">=&quot;liger-button&quot;</span><span style="color: #FF0000;"> data-click</span><span style="color: #0000FF;">=&quot;setValue&quot;</span><span style="color: #FF0000;"> style</span><span style="color: #0000FF;">=&quot;margin-top:4px;&quot;</span><span style="color: #0000FF;">&gt;</span><span style="color: #000000;">设置值(2)</span><span style="color: #0000FF;">&lt;/</span><span style="color: #800000;">div</span><span style="color: #0000FF;">&gt;</span><span style="color: #000000;">
</span><span style="color: #008080;">43</span> <span style="color: #000000;">    
</span><span style="color: #008080;">44</span> <span style="color: #000000;"> </span><span style="color: #0000FF;">&lt;</span><span style="color: #800000;">div </span><span style="color: #FF0000;">class</span><span style="color: #0000FF;">=&quot;liger-button&quot;</span><span style="color: #FF0000;"> data-click</span><span style="color: #0000FF;">=&quot;setDisabled&quot;</span><span style="color: #FF0000;"> style</span><span style="color: #0000FF;">=&quot;margin-top:4px;&quot;</span><span style="color: #0000FF;">&gt;</span><span style="color: #000000;">设置不可用</span><span style="color: #0000FF;">&lt;/</span><span style="color: #800000;">div</span><span style="color: #0000FF;">&gt;</span><span style="color: #000000;">
</span><span style="color: #008080;">45</span> <span style="color: #000000;">    
</span><span style="color: #008080;">46</span> <span style="color: #000000;"> </span><span style="color: #0000FF;">&lt;</span><span style="color: #800000;">div </span><span style="color: #FF0000;">class</span><span style="color: #0000FF;">=&quot;liger-button&quot;</span><span style="color: #FF0000;"> data-click</span><span style="color: #0000FF;">=&quot;setEnabled&quot;</span><span style="color: #FF0000;"> style</span><span style="color: #0000FF;">=&quot;margin-top:4px;&quot;</span><span style="color: #0000FF;">&gt;</span><span style="color: #000000;">设置可用</span><span style="color: #0000FF;">&lt;/</span><span style="color: #800000;">div</span><span style="color: #0000FF;">&gt;</span><span style="color: #000000;">
</span><span style="color: #008080;">47</span> <span style="color: #000000;"></span><span style="color: #0000FF;">&lt;/</span><span style="color: #800000;">body</span><span style="color: #0000FF;">&gt;</span></div></pre>
        
        <h3>截图</h3>

        <p>
            <img src="../../uishow/ligerRadioList.jpg" />
        </p>  
        

			</body>
</html>